'''
Created on Nov 29, 2010

@author: dexen
'''

from my_ind import MyInd


def dev_cond(ind):
    assert isinstance(ind, MyInd)
    return ind.is_alive() and ind.genotype != None and ind.phenotype == None

def energy_cond(ind):
    assert isinstance(ind, MyInd)
    return ind.is_alive() and ind.phenotype != None and ind.energy == None

def daylight_cond(ind):
    assert isinstance(ind, MyInd)
    return ind.is_alive() and ind.phenotype != None and ind.daylight == None

def privacy_cond(ind):
    assert isinstance(ind, MyInd)
    return ind.is_alive() and ind.phenotype != None and ind.privacy == None


def feedback_cond(ind):
    assert isinstance(ind, MyInd)
    return ind.is_alive() and ind.energy != None and ind.daylight != None and ind.privacy != None
